<template>
    <div>
        <router-link class="active" :to="link">{{msg}}</router-link>
    </div>
</template>

<script>
import { activeAccount } from "@/service/api"
export default {
    data() {
        return {
            link: '',
            msg: '',
        }
    },
    mounted() {
        this.initActive()
    },
    methods: {
        async initActive() {
            let param = {
                key: this.$route.params.key,
                name: this.$route.params.name,
            }

            let res = await activeAccount(param)
            this.link = res.result
            this.msg = res.msg
            console.log(res)
        }
    }
}
</script>

<style lang="scss" scoped>
    @import '../../style/mixin';
    .active {
        display: block;
        text-align: center;
        margin-top: 20px;
        color: $main;
    }
</style>


